
//
// Copyright 2009 Arne Halvorsen (arne.halvorsen@gmail.com)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

// Project page: http://code.google.com/p/mf4j/

//
// 091116 - aha42 - Starts in line change tracking.
// 091121 - aha42 - Added project page link (google code) to header comment.
// 091122 - aha42 - Java doc review, no changes.
// 091210 - aha42 - IOException -> FlickrException.
//

package org.aha.mf4j;

/**
 * <p>
 *   Interface for objects that performs authentication.
 * </p>
 * @author Arne Halvorsen (aha42)
 */
public interface Authenticator 
{
  /**
   * <p>
   *   Performs authentication.
   * </p>
   * @param fs    Session.
   * @param perms Permissions requested.
   * @return {@code true} if authentication or {@code false} if end user aborted
   *         the authentication.
   * @throws FlickrException If fails.
   */
  boolean authenticate(FlickrSession fs, String perms) throws FlickrException;
  
}
